

********************************************************************************************************
*THIS DO-FILE REPLICATES TABLES 4 IN:                                                  			   
* PATRICIA FUNK: 							                       	
* "HOW ACCURATE ARE SURVEYED PREFERENCES FOR PUBLIC POLICIES? EVIDENCE FROM
* A UNIQUE INSTITUTIONAL SETUP"                                                                                         
********************************************************************************************************

global data ="[your path]"
global results ="[your path]"

clear all
set more off
set matsize 2000


use "$data\VOX_prepared", clear 

preserve

keep survey_bias rec_SP year datum_id survey_bias_weighted survey_bias_weighted_left yes_official votenr

duplicates drop votenr, force


areg survey_bias  rec_SP , absorb(year ) cluster(datum_id)
outreg2 using "$results\tab4.xls", se 

areg  survey_bias_weighted  rec_SP , absorb(year ) cluster(datum_id)
outreg2 using "$results\tab4.xls", se append 


areg survey_bias_weighted_left rec_SP , absorb(year ) cluster(datum_id)
outreg2 using "$results\tab4.xls", se append 


areg survey_bias  rec_SP yes_official, absorb(year )cluster(datum_id)
outreg2 using "$results\tab4.xls", se append 

areg survey_bias  rec_SP yes_official, absorb(datum_id) robust
outreg2 using "$results\tab4.xls", se append 

restore
